package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 学生实体类
 */
@TableName("t_student")
public class StudentBean {
    /**学生编号*/
    @TableId(value = "pk_stuId",type = IdType.AUTO)
    private Integer stuId;
    /**学生名字*/
    @TableField("s_stuName")
    private String stuName;
    /**学生性别*/
    @TableField("s_sex")
    private String sex;
    /**所在班级*/
    @TableField(exist = false)
    private ClassBean stuClass;

    @TableField("fk_classId")
    private Integer classId;
    /**所在房间*/
    @TableField(exist = false)
    private RoomBean stuRoom;
    @TableField("fk_roomId")
    private Integer roomId;
    /**联系电话*/
    @TableField("s_stuPhone")
    private String stuPhone;
    /**学生头像*/
    @TableField("s_imgPath")
    private String imgPath;
    /**入住时间*/
    @TableField("s_stuDate")
    private LocalDate stuDate=LocalDate.now();

    public StudentBean() {
    }

    public StudentBean(String stuName, String sex, Integer classId, Integer roomId, String stuPhone, String imgPath) {
        this.stuName = stuName;
        this.sex = sex;
        this.classId = classId;
        this.roomId = roomId;
        this.stuPhone = stuPhone;
        this.imgPath = imgPath;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public Integer getStuId() {
        return stuId;
    }

    public void setStuId(Integer stuId) {
        this.stuId = stuId;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public ClassBean getStuClass() {
        return stuClass;
    }

    public void setStuClass(ClassBean stuClass) {
        this.stuClass = stuClass;
    }

    public RoomBean getStuRoom() {
        return stuRoom;
    }

    public void setStuRoom(RoomBean stuRoom) {
        this.stuRoom = stuRoom;
    }

    public String getStuPhone() {
        return stuPhone;
    }

    public void setStuPhone(String stuPhone) {
        this.stuPhone = stuPhone;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public LocalDate getStuDate() {
        return stuDate;
    }

    public void setStuDate(LocalDate stuDate) {
        this.stuDate = stuDate;
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "stuId=" + stuId +
                ", stuName='" + stuName + '\'' +
                ", sex='" + sex + '\'' +
                ", stuClass=" + stuClass +
                ", classId=" + classId +
                ", stuRoom=" + stuRoom +
                ", roomId=" + roomId +
                ", stuPhone='" + stuPhone + '\'' +
                ", imgPath='" + imgPath + '\'' +
                ", stuDate=" + stuDate +
                '}';
    }
}
